vim.cmd("filetype indent on")
local opt = vim.opt

opt.autochdir = true
opt.syntax = "enable"
opt.number = true
opt.wrap = false
opt.cursorline = true
opt.cursorcolumn = true
opt.termguicolors = true
opt.mouse:append("a")

opt.scrolloff = 2
opt.updatetime = 300
opt.timeoutlen = 500
opt.backup = false
opt.writebackup = false
opt.swapfile = false
opt.autoread = true
opt.ruler = true
opt.incsearch = true
-- vim.bo.autoread = true

opt.encoding = "utf-8"
opt.fenc = "utf-8"

-- 缩进
opt.tabstop = 4
opt.shiftwidth = 4
opt.softtabstop = 4
opt.expandtab = true

-- 代码折叠
opt.foldmethod = "indent"
opt.foldlevel = 99
opt.foldlevelstart = 1
-- opt.foldcolumn = 4

-- 系统剪切板
opt.clipboard:append("unnamedplus")

-- 默认新窗口在右或下
opt.splitright = true
opt.splitbelow = true

-- 搜索
opt.wrapscan = false
-- opt.ignorecase = true
-- opt.smartcase = true

-- 外观
opt.guifont = "Hack Nerd Font Mono:h12"
opt.guifontwide = "微软雅黑:h12"
-- opt.guifont = "更纱终端书呆黑体-简:h12"

-- diffopt
opt.diffopt = "filler,vertical,context:3"

opt.signcolumn = "yes"
opt.colorcolumn = "80"
opt.background = "dark"
opt.lines = 35
opt.columns = 118
opt.linespace = 2
opt.list = true

opt.shadafile = "NONE"
